// src/components/blog-post.vue

<template>
    <div class="blog-post">
      <h4>{{ title }}</h4>
      <!-- //触发父组件的事件，并向父组件传递数据 -->
      <button @click="$emit('enlargeText')">   
        Enlarge text
      </button>
    </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
    name: 'BlogPost',
    props: ['title'],
    emits: ['enlargeText']
})
</script>